package com.winchain.chainbill.bill.biz.send.cmd;

import com.shell.bee.acct.AcctException;
import com.shell.bee.acct.account.po.AcctBas;
import com.shell.framework.command.ICommand;
import com.winchain.chainbill.bill.biz.Bill;
import com.winchain.chainbill.trade.service.BillAcctService;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class TxCmd<T> implements ICommand<Bill<T>> {
	@Autowired
	private BillAcctService billAcctService;

	protected AcctBas getAcctBas(String custId, String acctType, String acctUse) {
		AcctBas acct = this.billAcctService.getAcctBas(custId, acctType, acctUse);
		if (acct == null) {
			throw new AcctException(custId + "-" + acctType + "����������");
		}
		return acct;
	}
}
